import request from '@/utils/request';
// 获取品牌分页列表 
// GET /admin/product/baseTrademark/{page}/{limit}
// page---第几页  limit---每页几条
export const reqTrademarkList = (page,limit)=>request({url:`/admin/product/baseTrademark/${page}/${limit}`,method: 'GET'});
// 新增品牌信息
// POST /admin/product/baseTrademark/save
// (Object)=>tmName(string),logoUrl(string)

// 修改品牌信息
// PUT /admin/product/baseTrademark/update
// (Object)=>id(string),tmName(string),logoUrl(string)

export const reqUpdateTrademark = (trademark)=>{
  if(trademark.id){
    return request({url:`/admin/product/baseTrademark/update`,method: 'PUT',data:trademark})
  }else {
    return request({url:'/admin/product/baseTrademark/save',method:'POST',data:trademark});
  }
};


// 删除品牌信息
// DELETE /admin/product/baseTrademark/remove/{id}
// id
export const reqDeleteTrademark = (id)=>request({url:`/admin/product/baseTrademark/remove/${id}`,method: 'DELETE'});